package com.gxbadge.service;

import java.util.List;

import com.gxbadge.model.Administrator;
import com.gxbadge.model.Article;
import com.gxbadge.model.Category;
import com.gxbadge.model.Image;
import com.gxbadge.model.ImageInfo;
import com.gxbadge.model.Language;
import com.gxbadge.model.Navigation;
import com.gxbadge.model.Operator;

public interface AdminManager {
	
	/* --------------------------------登录验证--------------------------------------------------- */
	/**
	 * @note (登录验证)
	 * @param (Administrator admin)
	 * @return (boolean类型)
	 */
	boolean validLogin(Administrator admin);
	
	/**
	 * @note (退出处理)
	 * @param (Administrator admin)
	 * @return ()
	 */
	void logout(Administrator admin);
	
	
	/* --------------------------------管理员信息--------------------------------------------------- */
	
	//管理员信息管理	
	/**
	 * @note (添加管理员)
	 * @param (Administrator admin)
	 * @return ()
	 */
	void add_admin(Administrator admin);
	
	/**
	 * @note (根据adminId删除管理员)
	 * @param (Integer adminId)
	 * @return ()
	 */
	void del_admin(Administrator admin);
	
	/**
	 * @note (根据更新管理员信息)
	 * @param (Integer adminId)
	 * @return ()
	 */
	void modify_adminByAdmin(Administrator admin);
	
	/**
	 * @note (通过用户名查找管理员信息)
	 * @param (Administrator admin)
	 * @return ()
	 */
	Administrator findAdminByName(String name);
	
	/**
	 * @note (通过用户名密码查找管理员)
	 * @param (Administrator admin)
	 * @return ()
	 */
	Administrator findAdminByNameAndPass(String name, String password);
	
	/**
	 * @note (查找所有管理员)
	 * @param (Administrator admin)
	 * @return ()
	 */
	List<Administrator> findAdminListAll();
	
	/**
	 * @note (根据adminId查找管理员)
	 * @param (Integer adminId)
	 * @return (Administrator admin)
	 */
	Administrator findAdminByAdminId(Integer adminId);
	
	
	
	/*
	 *  -------------------系统模块处理------------------                        
	 *  -------------------包括用户中心、系统管理、网站管理、留言信箱4部分
	 */
	
	void add_cate(Category cate);
	void del_cate(Category cate);
	void modify_cate(Category cate);
	Category findCateByCateId(Integer cateId);
	List<Category> findCateListByCatePid(Integer catePid);
	List<Category> findCateAll();
	Category findCateByNote(String note);
	
	/* --------------------------------语言模块--------------------------------------------------- */
	
	void add_lang(Language lang);
	void del_lang(Language lang);
	void modify_lang(Language lang);
	List<Language> findLangAll();
	Language findLangByLangId(Integer langId);
	
	
	
	
	
	/*
	 *  -------------------网站导航处理------------------                        
	 *  -------------------包括用户中心、系统管理、网站管理、留言信箱4部分
	 */
	List<Navigation> findNavListByNavPid(int navPid);
	Navigation findNavByNavId(int navId);
	
	void add_nav(Navigation nav);
	void del_nav(Navigation nav);
	void modify_nav(Navigation nav);
	
	/*---------------前台--------------------- */
	Navigation findNavByNote(String note);
	
	
	/*
	 *  ------------------操作模块处理------------------                        
	 *  -------------------
	 */
	List<Operator> findOperListByNav(Navigation nav);
	void add_oper(Operator oper);
	void del_oper(Operator oper);
	void modify_oper(Operator oper);
	Operator findOperByOperId(int operId);
	
	
	
	
	
	
	
	
	
	/* --------------------------------图片处理------------后台--------------------------------------- */
	
	void add_image(Image image);
	void del_image(Image image);
	void modify_image(Image image);
	List<Image> findImageAll();
	List<Image> findImageAllByPage(int offset, int pageSize);
	List<Image> findImageListByNavListAndPage(List<Navigation> navList, int offset, int pageSize);
	List<Image> findImageByNav(Navigation nav);
	List<Image> findImageByArti(Article arti);
	Image findImageByImageId(int imageId);
	List<Image> findImageByNavAndPage(int offset, int pageSize, Navigation nav);
	long find_imageCountByNav(Navigation nav);
	long find_imageAllCount();
	long find_imageListCountByNavList(List<Navigation> navList);
	
	/* --------------------------------图片处理----------前台----------------------------------------- */
	
	List<Image> findImageByNavListAndPage(List<Navigation> navList, int offset, int pageSize);
	List<Image> f_findImageByNavAndPage(Navigation nav, int offset, int pageSize);
	long f_find_imageCountByNav(Navigation nav);
	
	/* --------------------------------图片信息处理--------------------------------------------------- */
	
	void add_imageInfo(ImageInfo imageInfo);
	void del_imageInfo(ImageInfo imageInfo);
	void modify_imageInfo(ImageInfo imageInfo);
	
	ImageInfo findImageInfoByImage(Image image);
	ImageInfo findImageInfoByImageInfoId(int imageInfoId);

	
	/*
	 *  ------------------文章模块处理------------------                        
	 *  -------------------
	 */
	List<Article> findArtiListByNav(Navigation nav);
	void add_arti(Article arti);
	void del_arti(Article arti);
	void modify_arti(Article arti);
	Article findArtiByArtiId(int artiId);
	List<Article> findArtiListByNavList(List<Navigation> navList, int offset, int pageSize);
	long find_artiTotalCount(List<Navigation> navList);
	
	/* ------------------文章模块处理-------前台-----------    */                    
	List<Article> findFrontArtiListByNavList(List<Navigation> navList, int offset, int pageSize);
	long ffind_artiTotalCount(List<Navigation> navList);
	
	
	
	
	
}
